package com.ujoku.view.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.labillusion.core.util.StringUtils;
import com.labillusion.core.util.jsonFormat.SimpleDoubleSerializer;
import com.ujoku.domain.Winery;

import java.util.List;

/**
 * Created by Administrator on 2014/10/19.
 */
public class GoodsView{

    private String tags;

    private Integer recommended;
    private String prizeinfo;
    private Double price;
    @JsonSerialize(using = SimpleDoubleSerializer.class)
    private Double vipPrice;
    private String mgrade_year;
    private Integer mgrade_norm;
    private String mgrade_ingredients;
    private String mgrade_grade;
    private String mgrade_dis;
    private String mgrade_areas;
    private String mgrade_alcohol;
    private Double market_price;

    private String goods_name;
    private Integer goods_id;
    private String description;
    private List<String> smallImageList;
    private List<String> mediumImageList;
    private List<String> largeImageList;

    private List<String> descImageList;
    private String smallImage;
    private String mediumImage;
    private String largeImage;

    private Integer hot;
    private Integer isNew;
    private Integer sales;

    private Integer cate_id_2;
    private Integer cate_id_1;
    private String cate_name_1;
    private String cate_name_2;

    private Integer wineryId;
    private String wineryName;

    private int stock;

    private Boolean isFav;

    private int salesCount;

    private Boolean closed;

    private String subGoodsName;

    private Winery winery;

    private String recipe;
    private String origin;

    public String getRecipe() {
        return recipe;
    }

    public void setRecipe(String recipe) {
        this.recipe = recipe;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public Winery getWinery() {
        return winery;
    }

    public void setWinery(Winery winery) {
        this.winery = winery;
    }

    public List<String> getDescImageList() {
        return descImageList;
    }

    public void setDescImageList(List<String> descImageList) {
        this.descImageList = descImageList;
    }

    public String getSubGoodsName() {
        return subGoodsName;
    }

    public void setSubGoodsName(String subGoodsName) {
        this.subGoodsName = subGoodsName;
    }

    public Boolean getClosed() {
        return closed;
    }

    public void setClosed(Boolean closed) {
        this.closed = closed;
    }

    public int getSalesCount() {
        return salesCount;
    }

    public void setSalesCount(int salesCount) {
        this.salesCount = salesCount;
    }

    public String getSmallImage() {
        if(smallImageList != null && smallImageList.size() > 0)
            return mediumImageList.get(0);

        return null;
    }


    public String getMediumImage() {
        if(StringUtils.hasText(mediumImage))
            return this.mediumImage;

        if(mediumImageList != null && mediumImageList.size() > 0)
            return smallImageList.get(0);

        return null;
    }


    public String getLargeImage() {
        if(largeImageList != null && largeImageList.size() > 0)
            return largeImageList.get(0);

        return null;
    }

    public void setSmallImage(String smallImage) {
        this.smallImage = smallImage;
    }

    public void setMediumImage(String mediumImage) {
        this.mediumImage = mediumImage;
    }

    public void setLargeImage(String largeImage) {
        this.largeImage = largeImage;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public Integer getRecommended() {
        return recommended;
    }

    public void setRecommended(Integer recommended) {
        this.recommended = recommended;
    }

    public String getPrizeinfo() {
        return prizeinfo;
    }

    public void setPrizeinfo(String prizeinfo) {
        this.prizeinfo = prizeinfo;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getMgrade_year() {
        return mgrade_year;
    }

    public void setMgrade_year(String mgrade_year) {
        this.mgrade_year = mgrade_year;
    }

    public Integer getMgrade_norm() {
        return mgrade_norm;
    }

    public void setMgrade_norm(Integer mgrade_norm) {
        this.mgrade_norm = mgrade_norm;
    }

    public String getMgrade_ingredients() {
        return mgrade_ingredients;
    }

    public void setMgrade_ingredients(String mgrade_ingredients) {
        this.mgrade_ingredients = mgrade_ingredients;
    }

    public String getMgrade_grade() {
        return mgrade_grade;
    }

    public void setMgrade_grade(String mgrade_grade) {
        this.mgrade_grade = mgrade_grade;
    }

    public String getMgrade_dis() {
        return mgrade_dis;
    }

    public void setMgrade_dis(String mgrade_dis) {
        this.mgrade_dis = mgrade_dis;
    }

    public String getMgrade_areas() {
        return mgrade_areas;
    }

    public void setMgrade_areas(String mgrade_areas) {
        this.mgrade_areas = mgrade_areas;
    }

    public String getMgrade_alcohol() {
        return mgrade_alcohol;
    }

    public void setMgrade_alcohol(String mgrade_alcohol) {
        this.mgrade_alcohol = mgrade_alcohol;
    }

    public Double getMarket_price() {
        return market_price;
    }

    public void setMarket_price(Double market_price) {
        this.market_price = market_price;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public Integer getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(Integer goods_id) {
        this.goods_id = goods_id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<String> getSmallImageList() {
        return smallImageList;
    }

    public void setSmallImageList(List<String> smallImageList) {
        this.smallImageList = smallImageList;
    }

    public List<String> getMediumImageList() {
        return mediumImageList;
    }

    public void setMediumImageList(List<String> mediumImageList) {
        this.mediumImageList = mediumImageList;
    }

    public List<String> getLargeImageList() {
        return largeImageList;
    }

    public void setLargeImageList(List<String> largeImageList) {
        this.largeImageList = largeImageList;
    }

    public Integer getHot() {
        return hot;
    }

    public void setHot(Integer hot) {
        this.hot = hot;
    }

    public Integer getIsNew() {
        return isNew;
    }

    public void setIsNew(Integer isNew) {
        this.isNew = isNew;
    }

    public Integer getCate_id_2() {
        return cate_id_2;
    }

    public void setCate_id_2(Integer cate_id_2) {
        this.cate_id_2 = cate_id_2;
    }

    public Integer getCate_id_1() {
        return cate_id_1;
    }

    public void setCate_id_1(Integer cate_id_1) {
        this.cate_id_1 = cate_id_1;
    }

    public String getCate_name_1() {
        return cate_name_1;
    }

    public void setCate_name_1(String cate_name_1) {
        this.cate_name_1 = cate_name_1;
    }

    public String getCate_name_2() {
        return cate_name_2;
    }

    public void setCate_name_2(String cate_name_2) {
        this.cate_name_2 = cate_name_2;
    }

    public Integer getWineryId() {
        return wineryId;
    }

    public void setWineryId(Integer wineryId) {
        this.wineryId = wineryId;
    }

    public String getWineryName() {
        return wineryName;
    }

    public void setWineryName(String wineryName) {
        this.wineryName = wineryName;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public Integer getSales() {
        return sales;
    }

    public void setSales(Integer sales) {
        this.sales = sales;
    }

    public Boolean getIsFav(){return isFav;}

    public void setIsFav(Boolean isFav){this.isFav=isFav;}

    public Double getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(Double vipPrice) {
        this.vipPrice = vipPrice;
    }
}
